﻿using StructureMap;
using System.Web.Mvc;
using System.Web.Routing;
using System;

namespace CSC.FSVTracker.WebUI.Infrastructure
{
    public class StructureMapControllerFactory : DefaultControllerFactory
    {
        protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
        {
            return controllerType == null ? null : (IController)ObjectFactory.GetInstance(controllerType);
        }
    }
}